package com.desksoft.ecommerce.entity.mall.dto;

import java.util.ArrayList;
import java.util.List;

public class RelationExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public RelationExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andRidIsNull() {
            addCriterion("rId is null");
            return (Criteria) this;
        }

        public Criteria andRidIsNotNull() {
            addCriterion("rId is not null");
            return (Criteria) this;
        }

        public Criteria andRidEqualTo(String value) {
            addCriterion("rId =", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotEqualTo(String value) {
            addCriterion("rId <>", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidGreaterThan(String value) {
            addCriterion("rId >", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidGreaterThanOrEqualTo(String value) {
            addCriterion("rId >=", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidLessThan(String value) {
            addCriterion("rId <", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidLessThanOrEqualTo(String value) {
            addCriterion("rId <=", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidLike(String value) {
            addCriterion("rId like", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotLike(String value) {
            addCriterion("rId not like", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidIn(List<String> values) {
            addCriterion("rId in", values, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotIn(List<String> values) {
            addCriterion("rId not in", values, "rid");
            return (Criteria) this;
        }

        public Criteria andRidBetween(String value1, String value2) {
            addCriterion("rId between", value1, value2, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotBetween(String value1, String value2) {
            addCriterion("rId not between", value1, value2, "rid");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeIsNull() {
            addCriterion("mainItemCode is null");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeIsNotNull() {
            addCriterion("mainItemCode is not null");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeEqualTo(String value) {
            addCriterion("mainItemCode =", value, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeNotEqualTo(String value) {
            addCriterion("mainItemCode <>", value, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeGreaterThan(String value) {
            addCriterion("mainItemCode >", value, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeGreaterThanOrEqualTo(String value) {
            addCriterion("mainItemCode >=", value, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeLessThan(String value) {
            addCriterion("mainItemCode <", value, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeLessThanOrEqualTo(String value) {
            addCriterion("mainItemCode <=", value, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeLike(String value) {
            addCriterion("mainItemCode like", value, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeNotLike(String value) {
            addCriterion("mainItemCode not like", value, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeIn(List<String> values) {
            addCriterion("mainItemCode in", values, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeNotIn(List<String> values) {
            addCriterion("mainItemCode not in", values, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeBetween(String value1, String value2) {
            addCriterion("mainItemCode between", value1, value2, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andMainitemcodeNotBetween(String value1, String value2) {
            addCriterion("mainItemCode not between", value1, value2, "mainitemcode");
            return (Criteria) this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("type is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("type is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(String value) {
            addCriterion("type =", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(String value) {
            addCriterion("type <>", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(String value) {
            addCriterion("type >", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(String value) {
            addCriterion("type >=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(String value) {
            addCriterion("type <", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(String value) {
            addCriterion("type <=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLike(String value) {
            addCriterion("type like", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotLike(String value) {
            addCriterion("type not like", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<String> values) {
            addCriterion("type in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<String> values) {
            addCriterion("type not in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeBetween(String value1, String value2) {
            addCriterion("type between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(String value1, String value2) {
            addCriterion("type not between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeIsNull() {
            addCriterion("slaveItemCode is null");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeIsNotNull() {
            addCriterion("slaveItemCode is not null");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeEqualTo(String value) {
            addCriterion("slaveItemCode =", value, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeNotEqualTo(String value) {
            addCriterion("slaveItemCode <>", value, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeGreaterThan(String value) {
            addCriterion("slaveItemCode >", value, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeGreaterThanOrEqualTo(String value) {
            addCriterion("slaveItemCode >=", value, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeLessThan(String value) {
            addCriterion("slaveItemCode <", value, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeLessThanOrEqualTo(String value) {
            addCriterion("slaveItemCode <=", value, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeLike(String value) {
            addCriterion("slaveItemCode like", value, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeNotLike(String value) {
            addCriterion("slaveItemCode not like", value, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeIn(List<String> values) {
            addCriterion("slaveItemCode in", values, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeNotIn(List<String> values) {
            addCriterion("slaveItemCode not in", values, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeBetween(String value1, String value2) {
            addCriterion("slaveItemCode between", value1, value2, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andSlaveitemcodeNotBetween(String value1, String value2) {
            addCriterion("slaveItemCode not between", value1, value2, "slaveitemcode");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationIsNull() {
            addCriterion("directionRelation is null");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationIsNotNull() {
            addCriterion("directionRelation is not null");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationEqualTo(Short value) {
            addCriterion("directionRelation =", value, "directionrelation");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationNotEqualTo(Short value) {
            addCriterion("directionRelation <>", value, "directionrelation");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationGreaterThan(Short value) {
            addCriterion("directionRelation >", value, "directionrelation");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationGreaterThanOrEqualTo(Short value) {
            addCriterion("directionRelation >=", value, "directionrelation");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationLessThan(Short value) {
            addCriterion("directionRelation <", value, "directionrelation");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationLessThanOrEqualTo(Short value) {
            addCriterion("directionRelation <=", value, "directionrelation");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationIn(List<Short> values) {
            addCriterion("directionRelation in", values, "directionrelation");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationNotIn(List<Short> values) {
            addCriterion("directionRelation not in", values, "directionrelation");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationBetween(Short value1, Short value2) {
            addCriterion("directionRelation between", value1, value2, "directionrelation");
            return (Criteria) this;
        }

        public Criteria andDirectionrelationNotBetween(Short value1, Short value2) {
            addCriterion("directionRelation not between", value1, value2, "directionrelation");
            return (Criteria) this;
        }

        public Criteria andBindcountIsNull() {
            addCriterion("bindCount is null");
            return (Criteria) this;
        }

        public Criteria andBindcountIsNotNull() {
            addCriterion("bindCount is not null");
            return (Criteria) this;
        }

        public Criteria andBindcountEqualTo(Integer value) {
            addCriterion("bindCount =", value, "bindcount");
            return (Criteria) this;
        }

        public Criteria andBindcountNotEqualTo(Integer value) {
            addCriterion("bindCount <>", value, "bindcount");
            return (Criteria) this;
        }

        public Criteria andBindcountGreaterThan(Integer value) {
            addCriterion("bindCount >", value, "bindcount");
            return (Criteria) this;
        }

        public Criteria andBindcountGreaterThanOrEqualTo(Integer value) {
            addCriterion("bindCount >=", value, "bindcount");
            return (Criteria) this;
        }

        public Criteria andBindcountLessThan(Integer value) {
            addCriterion("bindCount <", value, "bindcount");
            return (Criteria) this;
        }

        public Criteria andBindcountLessThanOrEqualTo(Integer value) {
            addCriterion("bindCount <=", value, "bindcount");
            return (Criteria) this;
        }

        public Criteria andBindcountIn(List<Integer> values) {
            addCriterion("bindCount in", values, "bindcount");
            return (Criteria) this;
        }

        public Criteria andBindcountNotIn(List<Integer> values) {
            addCriterion("bindCount not in", values, "bindcount");
            return (Criteria) this;
        }

        public Criteria andBindcountBetween(Integer value1, Integer value2) {
            addCriterion("bindCount between", value1, value2, "bindcount");
            return (Criteria) this;
        }

        public Criteria andBindcountNotBetween(Integer value1, Integer value2) {
            addCriterion("bindCount not between", value1, value2, "bindcount");
            return (Criteria) this;
        }

        public Criteria andSequenceIsNull() {
            addCriterion("sequence is null");
            return (Criteria) this;
        }

        public Criteria andSequenceIsNotNull() {
            addCriterion("sequence is not null");
            return (Criteria) this;
        }

        public Criteria andSequenceEqualTo(Integer value) {
            addCriterion("sequence =", value, "sequence");
            return (Criteria) this;
        }

        public Criteria andSequenceNotEqualTo(Integer value) {
            addCriterion("sequence <>", value, "sequence");
            return (Criteria) this;
        }

        public Criteria andSequenceGreaterThan(Integer value) {
            addCriterion("sequence >", value, "sequence");
            return (Criteria) this;
        }

        public Criteria andSequenceGreaterThanOrEqualTo(Integer value) {
            addCriterion("sequence >=", value, "sequence");
            return (Criteria) this;
        }

        public Criteria andSequenceLessThan(Integer value) {
            addCriterion("sequence <", value, "sequence");
            return (Criteria) this;
        }

        public Criteria andSequenceLessThanOrEqualTo(Integer value) {
            addCriterion("sequence <=", value, "sequence");
            return (Criteria) this;
        }

        public Criteria andSequenceIn(List<Integer> values) {
            addCriterion("sequence in", values, "sequence");
            return (Criteria) this;
        }

        public Criteria andSequenceNotIn(List<Integer> values) {
            addCriterion("sequence not in", values, "sequence");
            return (Criteria) this;
        }

        public Criteria andSequenceBetween(Integer value1, Integer value2) {
            addCriterion("sequence between", value1, value2, "sequence");
            return (Criteria) this;
        }

        public Criteria andSequenceNotBetween(Integer value1, Integer value2) {
            addCriterion("sequence not between", value1, value2, "sequence");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}